package com.mxin.common.network

import okhttp3.Interceptor

class NetWorkBuilder {

    //配置连接超时时间
    var connectTimeOut = 10L

    //配置读取超时时间
    var readTimeOut = 10L

    //配置写超时时间
    var writeTimeOut = 10L

    // 基础域名地址
    var baseUrl:String? = null

    private val interceptors: MutableList<Interceptor> by lazy { mutableListOf() }

    fun addInterceptor(vararg interceptor: Interceptor){
//        interceptor.forEach {
//            if(!interceptors.contains(it)){
//                interceptors.add(it)
//            }
//        }
        interceptors.addAll(interceptors)
    }



}